﻿<ResourceDictionary 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2006"
    xmlns:System="clr-namespace:System;assembly=mscorlib"
    xmlns:PresentationOptions="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options"
    xmlns:Toolkit="http://schemas.microsoft.com/wpf/2008/toolkit">

    <!-- Button Style Definitions-->
    <SolidColorBrush x:Key="ButtonDefaultBackgroundBrush" Color="#FF595959" />
    <SolidColorBrush x:Key="ButtonMouseOverBackgroundBrush" Color="#FFAAAAAA" />
    <SolidColorBrush x:Key="ButtonPressedBackgroundBrush"  Color="#FF424242" />
    <SolidColorBrush x:Key="ButtonDisabledBackgroundBrush" Color="#FF666666" />
    
    <SolidColorBrush x:Key="ButtonDefaultBorderBrush"  Color="#FF333333" />
    <SolidColorBrush x:Key="ControlFocusBorderBrush" Color="#FFE5E5E5" />
    <SolidColorBrush x:Key="ButtonMouseOverBorderBrush" Color="#FF424242" />
    <SolidColorBrush x:Key="ButtonPressedBorderBrush" Color="#FF1A1A1A" />
    <SolidColorBrush x:Key="ButtonIsDefaultBorderBrush" Color="#FF9BB1C5" />
    <SolidColorBrush x:Key="ButtonIsFocusedBorderBrush"  Color="#FFE5E5E5" />
    <SolidColorBrush x:Key="ButtonDisabledBorderBrush" Color="#FF424242" />
    
    <SolidColorBrush x:Key="ButtonDefaultTextBrush" Color="#FFFFFFFF" />
    <SolidColorBrush x:Key="ButtonMouseOverTextBrush" Color="#FF1A1A1A" />
    <SolidColorBrush x:Key="ButtonDisabledTextBrush" Color="#FF808080" />
 
    <SolidColorBrush x:Key="ButtonDefaultBrush" Color="#FF808080" />
    <SolidColorBrush x:Key="ButtonSelectBrush" Color="#FFCCCCCC" />
   
    <SolidColorBrush x:Key="DarkBrush" Color="#FF1A1A1A" />
    <SolidColorBrush x:Key="BackgroundBrush" Color="#FF333333" />

    <SolidColorBrush x:Key="LayerChild1Brush" Color="#FF5C5C5C" />
    
    <SolidColorBrush x:Key="Text1Brush" Color="#FFFFFFFF" />
    <SolidColorBrush x:Key="DisabledTextBrush" Color="#FF808080" />
    <SolidColorBrush x:Key="PaletteBrush" Color="#FF595959" />
    <SolidColorBrush x:Key="RecessedBrush" Color="#FF424242" />


    <LinearGradientBrush x:Key="ButtonSelectionGrad" StartPoint="0,1" EndPoint="0,0">
        <LinearGradientBrush.GradientStops>
            <GradientStop Color="#FF333333" Offset="0" />
            <GradientStop Color="#FF3A3A3A" Offset="1" />
        </LinearGradientBrush.GradientStops>
    </LinearGradientBrush>
    
    <!--<Style x:Key="DefaultButtonBaseStyle" TargetType="{x:Type ButtonBase}">-->
    <Style x:Key="DefaultButtonBaseStyle" TargetType="{x:Type ButtonBase}">
        <Setter Property="Background" Value="{DynamicResource ButtonDefaultBackgroundBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultBorderBrush}" />
        <Setter Property="Foreground" Value="{DynamicResource ButtonDefaultTextBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="HorizontalAlignment" Value="Center" />
        <Setter Property="MinWidth" Value="75" />
        <Setter Property="MinHeight" Value="20" />
        <Setter Property="FontFamily" Value="{DynamicResource {x:Static SystemFonts.MessageFontFamily}}" />
        <Setter Property="FontSize" Value="{DynamicResource {x:Static SystemFonts.MessageFontSize}}" />
        <Setter Property="FontWeight" Value="{DynamicResource {x:Static SystemFonts.MessageFontWeight}}" />
        <Setter Property="Padding" Value="1" />
        <Setter Property="FocusVisualStyle">
            <Setter.Value>
                <Style>
                    <Setter Property="ButtonBase.Template">
                        <Setter.Value>
                            <ControlTemplate>
                                <Rectangle SnapsToDevicePixels="true" Stroke="{DynamicResource ControlFocusBorderBrush}" StrokeThickness="1" RadiusX="3" RadiusY="3" />
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ButtonBase}">
                    <Border Name="ButtonTemplateGrid" Background="{TemplateBinding Background}" CornerRadius="3" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
                        <Grid x:Uid="Grid_7">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*" />
                                <RowDefinition Height="*" />
                            </Grid.RowDefinitions>
                            <Border Name="HighlightBackground" CornerRadius="2" RenderTransformOrigin="0.5,1" Grid.Row="0" Margin="1,1,1,0" Background="{DynamicResource ButtonSelectionGrad}" Opacity="0.15" />
                            <ContentPresenter Name="Content" Grid.RowSpan="2" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="{TemplateBinding Padding}" RecognizesAccessKey="true" />
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsFocused" Value="true">
                            <Setter Value="{DynamicResource ButtonDefaultBackgroundBrush}" Property="Background" />
                            <Setter  Value="{DynamicResource ButtonDefaultTextBrush}" Property="Foreground" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Value="{DynamicResource ButtonMouseOverBackgroundBrush}" Property="Background" />
                            <Setter Value="{DynamicResource ButtonMouseOverBorderBrush}" Property="BorderBrush" />
                            <Setter Value="{DynamicResource ButtonMouseOverTextBrush}" Property="Foreground" />
                            <Setter TargetName="HighlightBackground" Property="Opacity" Value="0.4" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="true">
                            <Setter Value="{DynamicResource ButtonPressedBackgroundBrush}" Property="Background" />
                            <Setter Value="{DynamicResource ButtonPressedBorderBrush}" Property="BorderBrush" />
                            <Setter Value="{DynamicResource ButtonDefaultTextBrush}" Property="Foreground" />
                            <Setter TargetName="HighlightBackground" Property="Opacity" Value="0.1" />
                            <Setter TargetName="HighlightBackground" Property="RenderTransform">
                                <Setter.Value>
                                    <ScaleTransform ScaleX="1" ScaleY="-1" />
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Value="{DynamicResource ButtonDisabledBackgroundBrush}" Property="Background" />
                            <Setter Value="{DynamicResource ButtonDisabledBorderBrush}" Property="BorderBrush" />
                            <Setter Value="{DynamicResource ButtonDisabledTextBrush}" Property="Foreground" />
                            <Setter TargetName="HighlightBackground" Property="Visibility" Value="Hidden" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <LinearGradientBrush x:Key="WindowTitleGrad" StartPoint="0,0" EndPoint="0,1">
        <LinearGradientBrush.GradientStops>
            <GradientStop Color="#FF333333" Offset="0" />
            <GradientStop Color="#FFAAAAAA" Offset="1" />
        </LinearGradientBrush.GradientStops>
    </LinearGradientBrush>

    <!--<Style x:Key="MessageBoxStyle" TargetType="{x:Type Window}">-->
    <Style x:Key="MessageBoxStyle" TargetType="{x:Type Window}">
        <Style.Resources>
            <Style TargetType="{x:Type Button}" BasedOn="{StaticResource DefaultButtonBaseStyle}">
                <Setter Property="Margin" Value="8,0,8,2" />
            </Style>
        </Style.Resources>
        <Setter Property="Background" Value="#FF666666" />
        <Setter Property="BorderBrush" Value="#FFFFFFFF" />
        <Setter Property="Control.FontFamily" Value="{DynamicResource {x:Static SystemFonts.MessageFontFamily}}" />
        <Setter Property="Control.FontSize" Value="{DynamicResource {x:Static SystemFonts.MessageFontSize}}" />
        <Setter Property="Control.FontWeight" Value="{DynamicResource {x:Static SystemFonts.MessageFontWeight}}" />
        <Setter Property="SnapsToDevicePixels" Value="true" />
        
        <Setter Property="WindowStyle" Value="None" />
        <Setter Property="ResizeMode" Value="NoResize" />
        <Setter Property="BorderThickness" Value="0"  />
        <Setter Property="AllowsTransparency" Value="True"/>
    </Style>

    <!--<Style x:Key="DefaultDialogStyle" TargetType="{x:Type Window}">-->
    <Style x:Key="DefaultDialogStyle" TargetType="{x:Type Window}">
        <Style.Resources>
            <Style TargetType="{x:Type Button}" BasedOn="{StaticResource DefaultButtonBaseStyle}">
                <Setter Property="Margin" Value="8,0,8,2" />
            </Style>
        </Style.Resources>
        <Setter Property="Background" Value="#FF666666" />
        <Setter Property="BorderBrush" Value="#FFFFFFFF" />
        <Setter Property="Control.FontFamily" Value="{DynamicResource {x:Static SystemFonts.MessageFontFamily}}" />
        <Setter Property="Control.FontSize" Value="{DynamicResource {x:Static SystemFonts.MessageFontSize}}" />
        <Setter Property="Control.FontWeight" Value="{DynamicResource {x:Static SystemFonts.MessageFontWeight}}" />
        <Setter Property="SnapsToDevicePixels" Value="true" />

        <Setter Property="WindowStyle" Value="None" />
        <Setter Property="ResizeMode" Value="NoResize" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="AllowsTransparency" Value="True"/>
    </Style>


    <!-- The Background Brush is used as the background for the Main Window  -->
    <LinearGradientBrush x:Key="MainWindowBackgroundBrush" StartPoint="0.102759,-0.0431519" EndPoint="0.802759,0.913967">
        <GradientStop Color="#FF808593" Offset="0" />
        <GradientStop Color="#FFE8EBEC" Offset="1" />
    </LinearGradientBrush>

    <!--<Style x:Key="MainWindowStyle" TargetType="{x:Type Window}">-->
    <Style x:Key="MainWindowStyle" TargetType="{x:Type Window}">
        <Style.Resources>
            <Style TargetType="{x:Type Button}" BasedOn="{StaticResource DefaultButtonBaseStyle}">
                <!--<Setter Property="Margin" Value="8,0,8,2" />-->
            </Style>
        </Style.Resources>
        <Setter Property="Background" Value="{DynamicResource MainWindowBackgroundBrush}" />
    </Style>


    <!-- MainMenuBorderBrush is used as the Border for MainMenu  -->
    <LinearGradientBrush x:Key="MainMenuBorderBrush" EndPoint="0,1" StartPoint="0,0">
        <GradientStop Color="#CCC" Offset="0.0" />
        <GradientStop Color="#444" Offset="1.0" />
    </LinearGradientBrush>
    <SolidColorBrush x:Key="MainMenuDisabledBackgroundBrush" Color="#EEE" />
    <SolidColorBrush x:Key="MainMenuDisabledBorderBrush" Color="#AAA" />
    <!-- Main Menu - This template uses a StackPanel to layout MenuItems -->
    <Style x:Key="MainMenuStyle" TargetType="{x:Type Menu}">
        <Setter Property="Background" Value="#FF3A3A3A" />
        <Setter Property="BorderBrush" Value="{DynamicResource MainMenuBorderBrush}" />
        <Setter Property="SnapsToDevicePixels" Value="True" />
        <Setter Property="Control.FontSize" Value="14" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Menu}">
                    <Grid>
                        <Border Margin="1" x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" />
                        <StackPanel Background="{TemplateBinding Background}" IsItemsHost="True" ClipToBounds="True" Orientation="Horizontal" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Background" Value="{DynamicResource MainMenuDisabledBackgroundBrush}" TargetName="Border" />
                            <Setter Property="BorderBrush" Value="{DynamicResource MainMenuDisabledBorderBrush}" TargetName="Border" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


    <!--<Style x:Key="MainToolBarStyle" TargetType="{x:Type StackPanel}">-->
    <LinearGradientBrush x:Key="ToolBarBackgroundBrush" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Color="#FF808593" Offset="1" />
        <GradientStop Color="#FFE8EBEC" Offset="0" />
    </LinearGradientBrush>
    <Style x:Key="MainToolBarStyle" TargetType="{x:Type StackPanel}">
        <Style.Resources>
            <Style TargetType="{x:Type Button}">
                <Setter Property="Height" Value="24"/>
                <Setter Property="Width" Value="24"/>
                <Setter Property="Margin" Value="0,0,0,2" />
                <Setter Property="Opacity" Value="1"></Setter>
                <Setter Property="VerticalAlignment" Value="Bottom"/>
                <Setter Property="Background" Value="#00FFFFFF"/>
                <Setter Property="LayoutTransform">
                    <Setter.Value>
                        <ScaleTransform/>
                    </Setter.Value>
                </Setter>
                <Style.Triggers>
                    <EventTrigger RoutedEvent="Button.MouseEnter">
                        <EventTrigger.Actions>
                            <BeginStoryboard>
                                <Storyboard>
                                    <DoubleAnimation Storyboard.TargetProperty="LayoutTransform.ScaleX"
                To="1.4" Duration="0:0:0.25"/>
                                    <DoubleAnimation Storyboard.TargetProperty="LayoutTransform.ScaleY"
                To="1.4" Duration="0:0:0.25"/>
                                </Storyboard>
                            </BeginStoryboard>
                        </EventTrigger.Actions>
                    </EventTrigger>
                    <EventTrigger RoutedEvent="Button.MouseLeave">
                        <EventTrigger.Actions>
                            <BeginStoryboard>
                                <Storyboard>
                                    <DoubleAnimation Storyboard.TargetProperty="LayoutTransform.ScaleX"
                To="1" Duration="0:0:0.5"/>
                                    <DoubleAnimation Storyboard.TargetProperty="LayoutTransform.ScaleY"
                To="1" Duration="0:0:0.5"/>
                                </Storyboard>
                            </BeginStoryboard>
                        </EventTrigger.Actions>
                    </EventTrigger>

                    <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsEnabled}" Value="False">
                        <Setter Property="Opacity" Value="0.36"></Setter>
                    </DataTrigger>
                    <Trigger Property="IsMouseOver" Value="True">
                        <Trigger.EnterActions>
                            <BeginStoryboard>
                                <Storyboard>
                                    <DoubleAnimation Storyboard.TargetProperty="Opacity"
                  To="1" Duration="0:0:0.25" />
                                </Storyboard>
                            </BeginStoryboard>
                        </Trigger.EnterActions>
                        <Trigger.ExitActions>
                            <BeginStoryboard>
                                <Storyboard>
                                    <DoubleAnimation Storyboard.TargetProperty="Opacity"
                  To="0.75" Duration="0:0:1" />
                                </Storyboard>
                            </BeginStoryboard>
                        </Trigger.ExitActions>
                    </Trigger>

                </Style.Triggers>
            </Style>
        </Style.Resources>
        <Setter Property="Margin" Value="0,0,0,4" />
        <Setter Property="Background" Value="{DynamicResource ToolBarBackgroundBrush}" />
    </Style>
    <!--<Style x:Key="MainToolBarStyle" TargetType="{x:Type StackPanel}">-->
    
    <!--<Style TargetType="{x:Type ToolTip}">-->
    <Style TargetType="{x:Type ToolTip}">
        <Setter Property="Foreground" Value="#FFFFFFFF" />
        <Setter Property="FontFamily" Value="{DynamicResource {x:Static SystemFonts.MessageFontFamily}}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToolTip}">
                    <Border BorderBrush="#FF808593" BorderThickness="1" Background="#BB666666">
                        <ContentPresenter Margin="6,4,6,4" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


    <SolidColorBrush x:Key="TabSelectionBrush" Color="#808080" />
    <SolidColorBrush x:Key="TabItemForegroundBrush" Color="#FFFFFFFF" />
    <SolidColorBrush x:Key="TabOverBrush" Color="#FFAAAAAA" />
    <SolidColorBrush x:Key="TabPaletteBrush" Color="#FF595959" />
    <SolidColorBrush x:Key="TabDisabledTextBrush" Color="#FF808080" />
    <SolidColorBrush x:Key="TabItemBackgroundBrush" Color="#FF424242" />
    <!--<Style x:Key="TabItemBaseStyle" TargetType="{x:Type TabItem}" >-->
    <Style x:Key="TabItemBaseStyle" TargetType="{x:Type TabItem}" >
        <Setter x:Uid="Setter_1033" Property="Background" Value="{DynamicResource TabItemBackgroundBrush}" />
        <Setter x:Uid="Setter_1034" Property="BorderBrush" Value="{x:Null}" />
        <Setter x:Uid="Setter_1035" Property="Foreground" Value="{DynamicResource TabItemForegroundBrush}" />
        <Setter x:Uid="Setter_1036" Property="MinHeight" Value="20" />
        <Setter x:Uid="Setter_1134" Property="FontFamily" Value="{DynamicResource {x:Static SystemFonts.MessageFontFamily}}" />
        <Setter x:Uid="Setter_1637" Property="FontSize" Value="{DynamicResource {x:Static SystemFonts.MessageFontSize}}" />
        <Setter x:Uid="Setter_1638" Property="FontWeight" Value="{DynamicResource {x:Static SystemFonts.MessageFontWeight}}" />
        <Setter x:Uid="Setter_1058" Property="SnapsToDevicePixels" Value="true" />
        <Setter x:Uid="Setter_1163" Property="IsTabStop" Value="false" />
        <Setter x:Uid="Setter_1321" Property="HorizontalContentAlignment" Value="Left" />
        <Setter Property="ClipToBounds" Value="False"/>
        <Setter Property="RenderTransformOrigin" Value="0.5,1" />
        <Setter Property="RenderTransform">
            <Setter.Value>
                <ScaleTransform/>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsEnabled" Value="false">
                <Setter Property="Background" Value="{DynamicResource TabPaletteBrush}" />
                <Setter Property="Foreground" Value="{DynamicResource TabDisabledTextBrush}" />
            </Trigger>
            <Trigger Property="IsSelected" Value="true">
                <Setter Property="Panel.ZIndex" Value="100" />
                <Setter Property="Background" Value="{DynamicResource TabSelectionBrush}" />
                <Setter Property="Foreground" Value="{DynamicResource TabItemForegroundBrush}" />
            </Trigger>

            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsMouseOver" Value="true" />
                    <Condition Property="IsSelected" Value="false" />
                </MultiTrigger.Conditions>
                <MultiTrigger.EnterActions>
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" To="1" Duration="0:0:0.25"/>
                            <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="1.4" Duration="0:0:0.25"/>
                        </Storyboard>
                    </BeginStoryboard>
                </MultiTrigger.EnterActions>
                <MultiTrigger.ExitActions>
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" To="1" Duration="0:0:0.25"/>
                            <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="1" Duration="0:0:0.25"/>
                        </Storyboard>
                    </BeginStoryboard>
                </MultiTrigger.ExitActions>
                <Setter Property="Background" Value="{DynamicResource TabOverBrush}" />
                <Setter Property="Foreground" Value="{DynamicResource TabItemForegroundBrush}" />
            </MultiTrigger>
        </Style.Triggers>
    </Style>

    <!--<Style x:Key="DefaultTabItemStyle" TargetType="{x:Type TabItem}" BasedOn="{StaticResource ExpressionTabItemBase}">-->
    <Style x:Key="DefaultTabItemStyle" TargetType="{x:Type TabItem}" BasedOn="{StaticResource TabItemBaseStyle}">
        <Setter x:Uid="Setter_1039" Property="Template">
            <Setter.Value>
                <ControlTemplate x:Uid="ControlTemplate_25" TargetType="{x:Type TabItem}">
                    <Border Name="Border" x:Uid="Border_18" Margin="0,0,2,0" 
                            Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" 
                            BorderThickness="0" CornerRadius="3,3,0,0" Height="{TemplateBinding Height}">
                        <ContentPresenter Name="ContentSite" x:Uid="ContentPresenter_6" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" 
                                          Margin="5,0,5,0" VerticalAlignment="Center" RecognizesAccessKey="true" ContentSource="Header" MinWidth="64"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger x:Uid="Trigger_1008" Property="TabStripPlacement" Value="Bottom">
                            <Setter x:Uid="Setter_1047" TargetName="Border" Property="CornerRadius" Value="0,0,3,3" />
                        </Trigger>
                    </ControlTemplate.Triggers>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="{x:Type TabItem}" BasedOn="{StaticResource DefaultTabItemStyle}"/>
    
    <!--<Style x:Key="TabControlBaseStyle" x:Uid="Style_15" TargetType="{x:Type TabControl}">-->
    <Style x:Key="TabControlBaseStyle" x:Uid="Style_15" TargetType="{x:Type TabControl}">
        <Setter Property="ItemContainerStyle" Value="{StaticResource DefaultTabItemStyle}" />
        <Setter Property="ClipToBounds" Value="true" />
        <Setter Property="BorderBrush" Value="{x:Null}" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="Background" Value="{DynamicResource ButtonDefaultBrush}" />
        <Setter Property="Padding" Value="0" />
        <Setter Property="Focusable" Value="false" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TabControl}">
                    <Grid Name="Grid1" KeyboardNavigation.TabNavigation="Local">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Name="ColumnDefinition0" />
                            <ColumnDefinition Name="ColumnDefinition1" Width="0px" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Name="RowDefinition0" x:Uid="RowDefinition_2" Height="Auto" />
                            <RowDefinition Name="RowDefinition1" x:Uid="RowDefinition_3" Height="*" />
                        </Grid.RowDefinitions>
                        <TabPanel Name="HeaderPanel" Background="Transparent" KeyboardNavigation.TabIndex="1" Grid.Column="0" Grid.Row="0" IsItemsHost="true" />
                        <Border Name="ContentPanel" BorderThickness="{TemplateBinding BorderThickness}" 
                                BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" 
                                KeyboardNavigation.TabNavigation="Local" KeyboardNavigation.DirectionalNavigation="Contained" 
                                KeyboardNavigation.TabIndex="2" Grid.Column="0" Grid.Row="1" CornerRadius="0,0,3,3">
                            <ContentPresenter Name="ContentSite" Margin="{TemplateBinding Padding}" Content="{TemplateBinding SelectedContent}" 
                                              ContentTemplate="{TemplateBinding SelectedContentTemplate}" ContentTemplateSelector="{TemplateBinding SelectedContentTemplateSelector}" />
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger x:Uid="Trigger_61" Property="TabStripPlacement" Value="Bottom">
                            <Setter x:Uid="Setter_370" TargetName="HeaderPanel" Property="Grid.Row" Value="1" />
                            <Setter x:Uid="Setter_371" TargetName="ContentPanel" Property="Grid.Row" Value="0" />
                            <Setter x:Uid="Setter_372" TargetName="ContentPanel" Property="BorderThickness" Value="0,0,0,1" />
                            <Setter x:Uid="Setter_373" TargetName="RowDefinition0" Property="Height" Value="*" />
                            <Setter x:Uid="Setter_374" TargetName="RowDefinition1" Property="Height" Value="Auto" />
                            <Setter x:Uid="Setter_375" TargetName="HeaderPanel" Property="Margin" Value="2,0,2,2" />
                        </Trigger>
                        <Trigger x:Uid="Trigger_1078" Property="TabStripPlacement" Value="Right">
                            <Setter x:Uid="Setter_1405" TargetName="HeaderPanel" Property="Grid.Column" Value="1" />
                            <Setter x:Uid="Setter_1473" TargetName="ContentPanel" Property="Grid.Row" Value="0" />
                            <Setter x:Uid="Setter_1406" TargetName="ContentPanel" Property="BorderThickness" Value="0,0,1,0" />
                            <Setter x:Uid="Setter_1407" TargetName="RowDefinition0" Property="Height" Value="*" />
                            <Setter x:Uid="Setter_1408" TargetName="RowDefinition1" Property="Height" Value="0" />
                            <Setter x:Uid="Setter_1409" TargetName="ColumnDefinition0" Property="Width" Value="*" />
                            <Setter x:Uid="Setter_1474" TargetName="ColumnDefinition1" Property="Width" Value="Auto" />
                            <Setter x:Uid="Setter_1475" TargetName="HeaderPanel" Property="Margin" Value="0,2,2,2" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--<Style TargetType="{x:Type TabControl}" BasedOn="{StaticResource ExpressionTabControl}" >-->
    <Style TargetType="{x:Type TabControl}" BasedOn="{StaticResource TabControlBaseStyle}" >
        <Setter x:Uid="Setter_1314" Property="Template">
            <Setter.Value>
                <ControlTemplate x:Uid="ControlTemplate_72" TargetType="{x:Type TabControl}">
                    <Grid Name="Grid1" x:Uid="Grid_54" KeyboardNavigation.TabNavigation="Local">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition x:Uid="ColumnDefinition_45" />
                            <ColumnDefinition x:Uid="ColumnDefinition_46" Width="0px" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Name="RowDefinition0" x:Uid="RowDefinition0" Height="Auto" />
                            <RowDefinition Name="RowDefinition1" x:Uid="RowDefinition1" Height="*" />
                        </Grid.RowDefinitions>
                        <UniformGrid Name="HeaderPanel" x:Uid="UniformGrid_1" Background="Transparent" KeyboardNavigation.TabIndex="1" 
                                     Grid.Column="0" Grid.Row="0" IsItemsHost="true" Rows="1" Margin="0,8,-2,0" />
                        <Border Name="ContentPanel" x:Uid="Border_46" BorderThickness="{TemplateBinding BorderThickness}" 
                                BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" 
                                KeyboardNavigation.TabNavigation="Local" KeyboardNavigation.DirectionalNavigation="Contained" 
                                KeyboardNavigation.TabIndex="2" Grid.Column="0" Grid.Row="1" CornerRadius="0,0,3,3">
                            <ContentPresenter Name="ContentSite" x:Uid="ContentPresenter_42" Margin="{TemplateBinding Padding}" 
                                              Content="{TemplateBinding SelectedContent}" ContentTemplate="{TemplateBinding SelectedContentTemplate}" 
                                              ContentTemplateSelector="{TemplateBinding SelectedContentTemplateSelector}" />
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger x:Uid="Trigger_1068" Property="TabStripPlacement" Value="Bottom">
                            <Setter x:Uid="Setter_1315" TargetName="HeaderPanel" Property="Grid.Row" Value="1" />
                            <Setter x:Uid="Setter_1316" TargetName="ContentPanel" Property="Grid.Row" Value="0" />
                            <Setter x:Uid="Setter_1317" TargetName="ContentPanel" Property="BorderThickness" Value="0,0,0,1" />
                            <Setter x:Uid="Setter_1318" TargetName="RowDefinition0" Property="Height" Value="*" />
                            <Setter x:Uid="Setter_1319" TargetName="RowDefinition1" Property="Height" Value="Auto" />
                            <Setter x:Uid="Setter_1320" TargetName="HeaderPanel" Property="Margin" Value="2,0,2,2" />
                        </Trigger>
                    </ControlTemplate.Triggers>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


    <!--<Style x:Key="MenuScrollViewer"  TargetType="{x:Type ScrollViewer}">-->
    <Style x:Key="MenuScrollViewer"  TargetType="{x:Type ScrollViewer}">
        <Setter Property="HorizontalScrollBarVisibility" Value="Hidden" />
        <Setter Property="VerticalScrollBarVisibility" Value="Auto" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ScrollViewer}">
                    <Grid x:Uid="Grid_27">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition x:Uid="ColumnDefinition_21" Width="*" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition x:Uid="RowDefinition_14" Height="Auto" />
                            <RowDefinition x:Uid="RowDefinition_15" Height="*" />
                            <RowDefinition x:Uid="RowDefinition_16" Height="Auto" />
                        </Grid.RowDefinitions>
                        <Border x:Uid="Border_24" Grid.Column="0" Grid.Row="1">
                            <ScrollContentPresenter x:Uid="ScrollContentPresenter_1" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" Margin="{TemplateBinding Padding}" />
                        </Border>
                        <RepeatButton Name="LineUpButton" x:Uid="RepeatButton_5" Focusable="false" Grid.Column="0" Grid.Row="0" Command="ScrollBar.LineUpCommand">
                            <RepeatButton.Visibility>
                                <MultiBinding x:Uid="MultiBinding_1" FallbackValue="Visibility.Collapsed" ConverterParameter="0">
                                    <MultiBinding.Converter>
                                        <MenuScrollingVisibilityConverter x:Uid="MenuScrollingVisibilityConverter_1" />
                                    </MultiBinding.Converter>
                                    <Binding x:Uid="Binding_1" Path="ComputedVerticalScrollBarVisibility" RelativeSource="{RelativeSource TemplatedParent}" />
                                    <Binding x:Uid="Binding_2" Path="VerticalOffset" RelativeSource="{RelativeSource TemplatedParent}" />
                                    <Binding x:Uid="Binding_3" Path="ExtentHeight" RelativeSource="{RelativeSource TemplatedParent}" />
                                    <Binding x:Uid="Binding_4" Path="ViewportHeight" RelativeSource="{RelativeSource TemplatedParent}" />
                                </MultiBinding>
                            </RepeatButton.Visibility>
                            <RepeatButton.Style>
                                <Style TargetType="{x:Type RepeatButton}">
                                    <Setter x:Uid="Setter_420" Property="ClickMode" Value="Hover" />
                                    <Setter x:Uid="Setter_421" Property="MinWidth" Value="0" />
                                    <Setter x:Uid="Setter_422" Property="MinHeight" Value="0" />
                                    <Setter x:Uid="Setter_423" Property="Template">
                                        <Setter.Value>
                                            <ControlTemplate x:Uid="ControlTemplate_40" TargetType="{x:Type RepeatButton}">
                                                <DockPanel x:Uid="DockPanel_1" Background="#00FFFFFF">
                                                    <Rectangle Name="R1" x:Uid="Rectangle_43" Fill="#00FFFFFF" Width="1" DockPanel.Dock="Right" />
                                                    <Rectangle Name="B1" x:Uid="Rectangle_44" Fill="#00FFFFFF" Height="1" DockPanel.Dock="Bottom" />
                                                    <Rectangle Name="L1" x:Uid="Rectangle_45" Fill="#00FFFFFF" Width="1" DockPanel.Dock="Left" />
                                                    <Rectangle Name="T1" x:Uid="Rectangle_46" Fill="#00FFFFFF" Height="1" DockPanel.Dock="Top" />
                                                    <ContentPresenter Name="ContentContainer" x:Uid="ContentPresenter_14" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" Margin="2,2,2,2" HorizontalAlignment="Center" VerticalAlignment="Center" />
                                                </DockPanel>
                                                <ControlTemplate.Triggers>
                                                    <Trigger x:Uid="Trigger_70" Property="IsPressed" Value="true">
                                                        <Setter x:Uid="Setter_424" Value="{DynamicResource {x:Static SystemColors.ControlLightLightBrush}}" TargetName="R1" Property="Fill" />
                                                        <Setter x:Uid="Setter_425" Value="{DynamicResource {x:Static SystemColors.ControlLightLightBrush}}" TargetName="B1" Property="Fill" />
                                                        <Setter x:Uid="Setter_426" Value="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrush}}" TargetName="L1" Property="Fill" />
                                                        <Setter x:Uid="Setter_427" Value="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrush}}" TargetName="T1" Property="Fill" />
                                                        <Setter x:Uid="Setter_428" TargetName="ContentContainer" Property="Margin" Value="3,3,1,1" />
                                                    </Trigger>
                                                </ControlTemplate.Triggers>

                                            </ControlTemplate>
                                        </Setter.Value>
                                    </Setter>
                                </Style>
                            </RepeatButton.Style>
                            <RepeatButton.CommandTarget>
                                <Binding x:Uid="Binding_5" RelativeSource="{RelativeSource TemplatedParent}" />
                            </RepeatButton.CommandTarget>
                            <Path x:Uid="Path_6" Fill="{DynamicResource {x:Static SystemColors.MenuTextBrush}}">
                                <Path.Data>
                                    <PathGeometry x:Uid="PathGeometry_32">
                                        <PathGeometry.Figures>
                                            <PathFigureCollection x:Uid="PathFigureCollection_32">
                                                <PathFigure x:Uid="PathFigure_32" StartPoint="0,4" IsFilled="true" IsClosed="true">
                                                    <LineSegment x:Uid="LineSegment_49" Point="3.5,0" />
                                                    <LineSegment x:Uid="LineSegment_50" Point="7,4" />
                                                </PathFigure>
                                            </PathFigureCollection>
                                        </PathGeometry.Figures>
                                    </PathGeometry>
                                </Path.Data>
                            </Path>
                        </RepeatButton>
                        <RepeatButton Name="LineDownButton" x:Uid="RepeatButton_6" Focusable="false" Grid.Column="0" Grid.Row="2" Command="ScrollBar.LineDownCommand">
                            <RepeatButton.Visibility>
                                <MultiBinding x:Uid="MultiBinding_2" FallbackValue="Visibility.Collapsed" ConverterParameter="100">
                                    <MultiBinding.Converter>
                                        <MenuScrollingVisibilityConverter x:Uid="MenuScrollingVisibilityConverter_2" />
                                    </MultiBinding.Converter>
                                    <Binding x:Uid="Binding_6" Path="ComputedVerticalScrollBarVisibility" RelativeSource="{RelativeSource TemplatedParent}" />
                                    <Binding x:Uid="Binding_7" Path="VerticalOffset" RelativeSource="{RelativeSource TemplatedParent}" />
                                    <Binding x:Uid="Binding_8" Path="ExtentHeight" RelativeSource="{RelativeSource TemplatedParent}" />
                                    <Binding x:Uid="Binding_9" Path="ViewportHeight" RelativeSource="{RelativeSource TemplatedParent}" />
                                </MultiBinding>
                            </RepeatButton.Visibility>
                            <RepeatButton.Style>
                                <Style x:Uid="Style_80" TargetType="{x:Type RepeatButton}">
                                    <Setter x:Uid="Setter_429" Property="ClickMode" Value="Hover" />
                                    <Setter x:Uid="Setter_430" Property="MinWidth" Value="0" />
                                    <Setter x:Uid="Setter_431" Property="MinHeight" Value="0" />
                                    <Setter x:Uid="Setter_432" Property="Template">
                                        <Setter.Value>
                                            <ControlTemplate x:Uid="ControlTemplate_41" TargetType="{x:Type RepeatButton}">
                                                <DockPanel x:Uid="DockPanel_2" Background="#00FFFFFF">
                                                    <Rectangle Name="R1" x:Uid="Rectangle_47" Fill="#00FFFFFF" Width="1" DockPanel.Dock="Right" />
                                                    <Rectangle Name="B1" x:Uid="Rectangle_48" Fill="#00FFFFFF" Height="1" DockPanel.Dock="Bottom" />
                                                    <Rectangle Name="L1" x:Uid="Rectangle_49" Fill="#00FFFFFF" Width="1" DockPanel.Dock="Left" />
                                                    <Rectangle Name="T1" x:Uid="Rectangle_50" Fill="#00FFFFFF" Height="1" DockPanel.Dock="Top" />
                                                    <ContentPresenter Name="ContentContainer" x:Uid="ContentPresenter_15" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" Margin="2,2,2,2" HorizontalAlignment="Center" VerticalAlignment="Center" />
                                                </DockPanel>
                                                <ControlTemplate.Triggers>
                                                    <Trigger x:Uid="Trigger_71" Property="IsPressed" Value="true">
                                                        <Setter x:Uid="Setter_433" Value="{DynamicResource {x:Static SystemColors.ControlLightLightBrush}}" TargetName="R1" Property="Fill" />
                                                        <Setter x:Uid="Setter_434" Value="{DynamicResource {x:Static SystemColors.ControlLightLightBrush}}" TargetName="B1" Property="Fill" />
                                                        <Setter x:Uid="Setter_435" Value="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrush}}" TargetName="L1" Property="Fill" />
                                                        <Setter x:Uid="Setter_436" Value="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrush}}" TargetName="T1" Property="Fill" />
                                                        <Setter x:Uid="Setter_437" TargetName="ContentContainer" Property="Margin" Value="3,3,1,1" />
                                                    </Trigger>
                                                </ControlTemplate.Triggers>
                                            </ControlTemplate>
                                        </Setter.Value>
                                    </Setter>
                                </Style>
                            </RepeatButton.Style>
                            <RepeatButton.CommandTarget>
                                <Binding x:Uid="Binding_10" RelativeSource="{RelativeSource TemplatedParent}" />
                            </RepeatButton.CommandTarget>
                            <Path x:Uid="Path_7" Fill="{DynamicResource {x:Static SystemColors.MenuTextBrush}}">
                                <Path.Data>
                                    <PathGeometry x:Uid="PathGeometry_33">
                                        <PathGeometry.Figures>
                                            <PathFigureCollection x:Uid="PathFigureCollection_33">
                                                <PathFigure x:Uid="PathFigure_33" StartPoint="0,0" IsFilled="true" IsClosed="true">
                                                    <LineSegment x:Uid="LineSegment_51" Point="3.5,4" />
                                                    <LineSegment x:Uid="LineSegment_52" Point="7,0" />
                                                </PathFigure>
                                            </PathFigureCollection>
                                        </PathGeometry.Figures>
                                    </PathGeometry>
                                </Path.Data>
                            </Path>
                        </RepeatButton>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!--<Style x:Key="MenuScrollViewer"  TargetType="{x:Type ScrollViewer}">-->
    
    
    <!--<Style x:Key="DefaultMenuItemStyle" TargetType="{x:Type MenuItem}">-->
    <SolidColorBrush x:Key="MenuTextBrush" Color="#FFFFFFFF" />
    <SolidColorBrush x:Key="MenuBackgroundBrush" Color="#FF3A3A3A" />
    <SolidColorBrush x:Key="MenuButtonOverBrush" Color="#FFAAAAAA" />
    <SolidColorBrush x:Key="MenuBackgroundBrush2" Color="#FF333333" />
    <Style TargetType="{x:Type MenuItem}">
        <Style.Triggers>
            <Trigger Property="Role" Value="TopLevelHeader">
                <Setter Property="Margin" Value="0,1,0,1" />
                <Setter Property="Padding" Value="6,3,6,3" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type MenuItem}">
                            <Border Name="Bd" SnapsToDevicePixels="true" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" 
                                    BorderThickness="{TemplateBinding BorderThickness}">
                                <DockPanel Name="DockPanel">
                                    <Path Name="GlyphPanel" Data="F0 M 0,2 L 0,4.8 2.5,7.4 7.1,2.8 7.1,0 2.5,4.6 Z" Visibility="Collapsed" 
                                          Fill="{TemplateBinding Foreground}" Margin="4,0,6,0" VerticalAlignment="Center" FlowDirection="LeftToRight" />
                                    <ContentPresenter Name="ContentPresenter" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" 
                                                      Margin="{TemplateBinding Padding}" Content="{TemplateBinding Header}" ContentTemplate="{TemplateBinding HeaderTemplate}" 
                                                      RecognizesAccessKey="true" ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}" ContentSource="Header" />
                                </DockPanel>
                            </Border>
                            <ControlTemplate.Triggers>
                                <Trigger x:Uid="Trigger_1049" Property="IsChecked" Value="true">
                                    <Setter x:Uid="Setter_1278" TargetName="GlyphPanel" Property="Visibility" Value="Visible" />
                                </Trigger>
                                <Trigger x:Uid="Trigger_1050" Property="IsHighlighted" Value="true">
                                    <Setter x:Uid="Setter_1280" Value="{DynamicResource MenuButtonOverBrush}" Property="Background" />
                                    <Setter x:Uid="Setter_1281" Value="{DynamicResource MenuBackgroundBrush2}" Property="Foreground" />
                                </Trigger>
                                <Trigger x:Uid="Trigger_1051" Property="IsEnabled" Value="false">
                                    <Setter x:Uid="Setter_1282" Value="{DynamicResource LayerChild1Brush}" Property="Foreground" />
                                </Trigger>
                            </ControlTemplate.Triggers>

                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Trigger>
            <Trigger x:Uid="Trigger_1052" Property="Role" Value="TopLevelItem">
                <Setter x:Uid="Setter_1283" Property="Margin" Value="0,1,0,1" />
                <Setter x:Uid="Setter_1284" Property="Padding" Value="6,3,6,3" />
                <Setter x:Uid="Setter_1285" Property="Template">
                    <Setter.Value>
                        <ControlTemplate x:Uid="ControlTemplate_68" TargetType="{x:Type MenuItem}">
                            <Border Name="Bd" x:Uid="Border_41" SnapsToDevicePixels="true" Background="{TemplateBinding Background}" 
                                    BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                                <DockPanel Name="DockPanel" x:Uid="DockPanel_5">
                                    <Path Name="GlyphPanel" x:Uid="Path_14" Data="F0 M 0,2 L 0,4.8 2.5,7.4 7.1,2.8 7.1,0 2.5,4.6 Z" 
                                          Visibility="Collapsed" Fill="{TemplateBinding Foreground}" Margin="4,0,6,0" VerticalAlignment="Center" FlowDirection="LeftToRight" />
                                    <ContentPresenter Name="ContentPresenter" x:Uid="ContentPresenter_37" 
                                                      SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" 
                                                      Margin="{TemplateBinding Padding}" Content="{TemplateBinding Header}" 
                                                      ContentTemplate="{TemplateBinding HeaderTemplate}" RecognizesAccessKey="true" 
                                                      ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}" ContentSource="Header" />
                                </DockPanel>
                            </Border>
                            <ControlTemplate.Triggers>
                                <Trigger x:Uid="Trigger_1054" Property="IsChecked" Value="true">
                                    <Setter x:Uid="Setter_1287" TargetName="GlyphPanel" Property="Visibility" Value="Visible" />
                                </Trigger>
                                <Trigger x:Uid="Trigger_1055" Property="IsHighlighted" Value="true">
                                    <Setter x:Uid="Setter_1289" Value="{DynamicResource MenuButtonOverBrush}" Property="Background" />
                                    <Setter x:Uid="Setter_1290" Value="{DynamicResource MenuBackgroundBrush2}" Property="Foreground" />
                                </Trigger>
                                <Trigger x:Uid="Trigger_1056" Property="IsEnabled" Value="false">
                                    <Setter x:Uid="Setter_1291" Value="{DynamicResource LayerChild1Brush}" Property="Foreground" />
                                </Trigger>
                            </ControlTemplate.Triggers>

                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Trigger>
            <Trigger x:Uid="Trigger_1057" Property="Role" Value="SubmenuHeader">
                <Setter x:Uid="Setter_1292" Property="DockPanel.Dock" Value="Top" />
                <Setter x:Uid="Setter_1293" Property="Padding" Value="0,2,0,2" />
                <Setter x:Uid="Setter_1294" Property="Template">
                    <Setter.Value>
                        <ControlTemplate x:Uid="ControlTemplate_69" TargetType="{x:Type MenuItem}">
                            <Border Name="Bd" x:Uid="Border_42" SnapsToDevicePixels="true" 
                                    Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                                <Grid Name="Grid" x:Uid="Grid_50">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition x:Uid="ColumnDefinition_50" MinWidth="17" Width="Auto" SharedSizeGroup="MenuItemIconColumnGroup" />
                                        <ColumnDefinition x:Uid="ColumnDefinition_40" Width="*" />
                                        <ColumnDefinition x:Uid="ColumnDefinition_41" Width="Auto" SharedSizeGroup="MenuItemIGTColumnGroup" />
                                        <ColumnDefinition x:Uid="ColumnDefinition_42" Width="14" />
                                    </Grid.ColumnDefinitions>
                                    <Path Name="GlyphPanel" x:Uid="Path_15" Data="F0 M 0,2 L 0,4.8 2.5,7.4 7.1,2.8 7.1,0 2.5,4.6 Z" 
                                          Visibility="Hidden" Fill="{TemplateBinding Foreground}" Margin="4,0,6,0" VerticalAlignment="Center" FlowDirection="LeftToRight" />
                                    <ContentPresenter Name="ContentPresenter" x:Uid="ContentPresenter_39" 
                                                      SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" 
                                                      Margin="{TemplateBinding Padding}" Grid.Column="1" Content="{TemplateBinding Header}" 
                                                      ContentTemplate="{TemplateBinding HeaderTemplate}" 
                                                      RecognizesAccessKey="true" ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}" ContentSource="Header" />
                                    <Path Name="Path" x:Uid="Path_16" Data="F0 M 0,0 L 4,3.5 0,7 Z" 
                                          Fill="{TemplateBinding Foreground}" Margin="4,0,6,0" VerticalAlignment="Center" Grid.Column="3" DockPanel.Dock="Right" />
                                </Grid>
                            </Border>
                            <ControlTemplate.Triggers>
                                
                                <Trigger x:Uid="Trigger_1060" Property="IsChecked" Value="true">
                                    <Setter x:Uid="Setter_1297" TargetName="GlyphPanel" Property="Visibility" Value="Visible" />
                                </Trigger>
                                <Trigger x:Uid="Trigger_1061" Property="IsHighlighted" Value="true">
                                    <Setter x:Uid="Setter_1299" Value="{DynamicResource MenuButtonOverBrush}" Property="Background" />
                                    <Setter x:Uid="Setter_1300" Value="{DynamicResource MenuBackgroundBrush2}" Property="Foreground" />
                                </Trigger>
                                <Trigger x:Uid="Trigger_1062" Property="IsEnabled" Value="false">
                                    <Setter x:Uid="Setter_1301" Value="{DynamicResource LayerChild1Brush}" Property="Foreground" />
                                </Trigger>
                            </ControlTemplate.Triggers>

                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Trigger>
            <Trigger x:Uid="Trigger_1063" Property="Role" Value="SubmenuItem">
                <Setter x:Uid="Setter_1302" Property="DockPanel.Dock" Value="Top" />
                <Setter x:Uid="Setter_1303" Property="Padding" Value="0,2,0,2" />
            </Trigger>
        </Style.Triggers>
        <Setter Property="HorizontalContentAlignment" 
                Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource FindAncestor , AncestorLevel=1, AncestorType={x:Type ItemsControl}}}" />
        <Setter Property="VerticalContentAlignment" 
                Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource FindAncestor , AncestorLevel=1, AncestorType={x:Type ItemsControl}}}" />
        <Setter Property="Background" Value="{DynamicResource MenuBackgroundBrush}" />
        <Setter Property="Foreground" Value="{DynamicResource MenuTextBrush}" />
        <Setter Property="FontFamily" Value="{DynamicResource {x:Static SystemFonts.MessageFontFamily}}" />
        <Setter Property="FontSize" Value="{DynamicResource {x:Static SystemFonts.MessageFontSize}}" />
        <Setter Property="FontWeight" Value="{DynamicResource {x:Static SystemFonts.MessageFontWeight}}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type MenuItem}">
                    <Border Name="Bd" SnapsToDevicePixels="true" Background="{TemplateBinding Background}" 
                            BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                        <Grid Name="Grid" >
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition MinWidth="17" Width="Auto" SharedSizeGroup="MenuItemIconColumnGroup" />
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="Auto" SharedSizeGroup="MenuItemIGTColumnGroup" />
                                <ColumnDefinition Width="14" />
                            </Grid.ColumnDefinitions>
                            <Path Name="GlyphPanel" Grid.Column="0" Visibility="Hidden" Fill="{TemplateBinding Foreground}" 
                                  Margin="4,0,6,0" VerticalAlignment="Center" FlowDirection="LeftToRight" Data="F0 M 0,2 L 0,4.8 2.5,7.4 7.1,2.8 7.1,0 2.5,4.6 Z"/>
                            <ContentPresenter Name="ContentPresenter" x:Uid="ContentPresenter_33" 
                                              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" 
                                              Margin="{TemplateBinding Padding}" Grid.Column="1" Content="{TemplateBinding Header}" 
                                              ContentTemplate="{TemplateBinding HeaderTemplate}" RecognizesAccessKey="true" 
                                              ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}" ContentSource="Header" />
                            <TextBlock Name="InputGestureText" x:Uid="TextBlock_10" Margin="5,2,0,2" Grid.Column="2" 
                                       DockPanel.Dock="Right" Text="{TemplateBinding InputGestureText}" />
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked" Value="true">
                            <Setter TargetName="GlyphPanel" Property="Visibility" Value="Visible" />
                        </Trigger>
                        <Trigger Property="IsHighlighted" Value="true">
                            <Setter Value="{DynamicResource MenuButtonOverBrush}" Property="Background" />
                            <Setter Value="{DynamicResource MenuBackgroundBrush2}" Property="Foreground" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Value="{DynamicResource LayerChild1Brush}" Property="Foreground" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!--<Style x:Key="DefaultMenuItemStyle" TargetType="{x:Type MenuItem}">-->

    <!--<Style x:Key="ScrollBarRepeatButtonStyle" TargetType="{x:Type RepeatButton}">-->
    <Style x:Key="ScrollBarRepeatButtonStyle" TargetType="{x:Type RepeatButton}">
        <Setter Property="Focusable" Value="false" />
        <Setter Property="Foreground" Value="{DynamicResource ButtonDefaultBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RepeatButton}">
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Value="{DynamicResource ButtonSelectBrush}" Property="Foreground" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="true">
                            <Setter Value="{DynamicResource DarkBrush}" Property="Foreground" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                    <Border Name="Border" Background="Transparent">
                        <ContentPresenter Name="ContentPresenter" HorizontalAlignment="Center" 
                                          VerticalAlignment="Center" Content="{TemplateBinding Content}" 
                                          ContentTemplate="{TemplateBinding ContentTemplate}" 
                                          ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
    <!--<Style x:Key="DefaultScrollBarStyle" TargetType="{x:Type ScrollBar}">-->
    <LinearGradientBrush x:Key="SliderGrad" StartPoint="0,0" EndPoint="1,0">
        <LinearGradientBrush.GradientStops>
            <GradientStop Color="#FF333333" Offset="0" />
            <GradientStop Color="#FF3A3A3A" Offset="1" />
        </LinearGradientBrush.GradientStops>
    </LinearGradientBrush>
    <Style x:Key="DefaultScrollBarStyle" TargetType="{x:Type ScrollBar}">
        <Setter Property="Stylus.IsFlicksEnabled" Value="false" />
        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrush}}" />
        <Setter Property="Background" Value="{DynamicResource SliderGrad}" />
        <Setter Property="Width" Value="12" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate x:Uid="ControlTemplate_27" TargetType="{x:Type ScrollBar}">
                    <Grid Name="GridRoot" x:Uid="Grid_33" 
                          Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidth}}" Background="{TemplateBinding Background}">
                        <Grid.RowDefinitions>
                            <RowDefinition x:Uid="RowDefinition_6" MaxHeight="18" />
                            <RowDefinition x:Uid="RowDefinition_7" Height="0.00001*" />
                            <RowDefinition x:Uid="RowDefinition_8" MaxHeight="18" />
                        </Grid.RowDefinitions>
                        <RepeatButton Name="DecreaseRepeat" x:Uid="RepeatButton_1" Command="ScrollBar.LineUpCommand"
                                      Style="{StaticResource ScrollBarRepeatButtonStyle}">
                            <Path Name="DecreaseArrow" Data="F0 M 0,7 L 4,0 8,7 Z" HorizontalAlignment="Center" 
                                  VerticalAlignment="Center" Fill="{Binding ElementName=DecreaseRepeat, Path=Foreground}" />
                        </RepeatButton>
                        <Track Name="PART_Track" x:Uid="Track_1" Grid.Row="1" IsDirectionReversed="true" Focusable="false">
                            <Track.Thumb>
                                <Thumb Name="Thumb" x:Uid="Thumb_1" Background="{DynamicResource ButtonDefaultBrush}">
                                    <Thumb.Style>
                                        <Style x:Uid="Style_100" TargetType="{x:Type Thumb}">
                                            <Setter x:Uid="Setter_1070" Property="Template">
                                                <Setter.Value>
                                                    <ControlTemplate x:Uid="ControlTemplate_28" TargetType="{x:Type Thumb}">
                                                        <Grid Name="Grid" x:Uid="Grid_34">
                                                            <Rectangle x:Uid="Rectangle_8" HorizontalAlignment="Stretch" 
                                                                       VerticalAlignment="Stretch" Width="Auto" Height="Auto" Fill="Transparent" />
                                                            <Rectangle Name="Rectangle1" x:Uid="Rectangle_9" HorizontalAlignment="Stretch" 
                                                                       VerticalAlignment="Stretch" Width="7" Height="Auto" RadiusX="4" RadiusY="4" 
                                                                       Fill="{TemplateBinding Background}" />
                                                        </Grid>
                                                        <ControlTemplate.Triggers>
                                                            <Trigger x:Uid="Trigger_1009" Property="Tag" Value="Horizontal">
                                                                <Setter x:Uid="Setter_1071" TargetName="Rectangle1" Property="Width" Value="Auto" />
                                                                <Setter x:Uid="Setter_1072" TargetName="Rectangle1" Property="Height" Value="7" />
                                                            </Trigger>
                                                        </ControlTemplate.Triggers>
                                                    </ControlTemplate>
                                                </Setter.Value>
                                            </Setter>
                                        </Style>
                                    </Thumb.Style>
                                </Thumb>
                            </Track.Thumb>
                            <Track.IncreaseRepeatButton>
                                <RepeatButton Name="PageUp" x:Uid="RepeatButton_2" Command="ScrollBar.PageDownCommand" Opacity="0" Focusable="false" />
                            </Track.IncreaseRepeatButton>
                            <Track.DecreaseRepeatButton>
                                <RepeatButton Name="PageDown" x:Uid="RepeatButton_3" Command="ScrollBar.PageUpCommand" Opacity="0" Focusable="false" />
                            </Track.DecreaseRepeatButton>
                        </Track>
                        <RepeatButton Name="IncreaseRepeat" Grid.Row="2" Command="ScrollBar.LineDownCommand" 
                                      Style="{StaticResource ScrollBarRepeatButtonStyle}">
                            <Path Name="IncreaseArrow" Data="F0 M 0,0 L 4,7 8,0 Z" HorizontalAlignment="Center" 
                                  VerticalAlignment="Center" Fill="{Binding ElementName=IncreaseRepeat, Path=Foreground}" />
                        </RepeatButton>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger x:Uid="Trigger_1012" SourceName="Thumb" Property="IsMouseOver" Value="true">
                            <Setter x:Uid="Setter_1075" Value="{DynamicResource ButtonSelectBrush}" TargetName="Thumb" Property="Background" />
                        </Trigger>
                        <Trigger x:Uid="Trigger_1013" SourceName="Thumb" Property="IsDragging" Value="true">
                            <Setter x:Uid="Setter_1076" Value="{DynamicResource DarkBrush}" TargetName="Thumb" Property="Background" />
                        </Trigger>
                        <Trigger x:Uid="Trigger_1016" Property="IsEnabled" Value="false">
                            <Setter x:Uid="Setter_1079" Value="{DynamicResource LayerChild1Brush}" TargetName="IncreaseArrow" Property="Fill" />
                            <Setter x:Uid="Setter_1080" Value="{DynamicResource LayerChild1Brush}" TargetName="DecreaseArrow" Property="Fill" />
                            <Setter x:Uid="Setter_1081" TargetName="Thumb" Property="Visibility" Value="Collapsed" />
                        </Trigger>
                        <Trigger x:Uid="Trigger_1017" Property="Orientation" Value="Horizontal">
                            <Setter x:Uid="Setter_1082" TargetName="GridRoot" Property="LayoutTransform">
                                <Setter.Value>
                                    <RotateTransform x:Uid="RotateTransform_1" Angle="-90" />
                                </Setter.Value>
                            </Setter>
                            <Setter x:Uid="Setter_1083" TargetName="PART_Track" Property="LayoutTransform">
                                <Setter.Value>
                                    <RotateTransform x:Uid="RotateTransform_2" Angle="-90" />
                                </Setter.Value>
                            </Setter>
                            <Setter Property="Width" Value="Auto" />
                            <Setter Property="Height" Value="12" />
                            <Setter TargetName="Thumb" Property="Tag" Value="Horizontal" />
                            <Setter TargetName="DecreaseRepeat" Property="Command" Value="ScrollBar.LineLeftCommand" />
                            <Setter TargetName="IncreaseRepeat" Property="Command" Value="ScrollBar.LineRightCommand" />
                            <Setter TargetName="PageDown" Property="Command" Value="ScrollBar.PageLeftCommand" />
                            <Setter TargetName="PageUp" Property="Command" Value="ScrollBar.PageRightCommand" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="{x:Type ScrollBar}"  BasedOn="{StaticResource DefaultScrollBarStyle}"/>

    <!--<Style x:Key="DefaultExpanderStyle" TargetType="{x:Type Expander}">-->
    <Style TargetType="{x:Type Expander}">
        <Style.Triggers>
            <Trigger Property="ExpandDirection" Value="Right">
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type Expander}">
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition x:Uid="ColumnDefinition_43" Width="Auto" />
                                    <ColumnDefinition Name="ContentRow" x:Uid="ColumnDefinition_44" Width="*" />
                                </Grid.ColumnDefinitions>
                                <Border Name="HeaderBorder" Background="{TemplateBinding Background}" 
                                        BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="4">
                                    <CheckBox Name="HeaderSite" x:Uid="CheckBox_6" Focusable="false" Margin="0,4,0,0" 
                                              Background="{DynamicResource Text1Brush}" OverridesDefaultStyle="true" 
                                              HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Content="{TemplateBinding Header}" 
                                              IsChecked="{Binding Path=IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}">
                                        <CheckBox.Template>
                                            <ControlTemplate TargetType="{x:Type CheckBox}">
                                                <Grid Name="CheckBoxContent" ToolTip="Collapse">
                                                        <ContentPresenter Name="ContentHeader" Focusable="false" Margin="4,48,4,4" 
                                                                      RecognizesAccessKey="true" HorizontalAlignment="Center" VerticalAlignment="Bottom">
                                                        <ContentPresenter.LayoutTransform>
                                                            <RotateTransform x:Uid="RotateTransform_13" Angle="-90" />
                                                        </ContentPresenter.LayoutTransform>
                                                    </ContentPresenter>
                                                </Grid>
                                                <ControlTemplate.Triggers>
                                                    <Trigger Property="IsChecked" Value="False">
                                                        <Setter TargetName="CheckBoxContent" 
                                                                Localization.Attributes="Value(Readable Modifiable)" Property="ToolTip" Value="Expand" />
                                                    </Trigger>
                                                </ControlTemplate.Triggers>
                                            </ControlTemplate>
                                        </CheckBox.Template>
                                    </CheckBox>
                                </Border>
                                <Border Name="ExpandSite" x:Uid="Border_45" Visibility="Collapsed" 
                                        Grid.Column="1" Background="{TemplateBinding Background}" 
                                        BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="0,0,4,4">
                                    <ContentPresenter x:Uid="ContentPresenter_41" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" 
                                                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}" 
                                                      Margin="{TemplateBinding Padding}" Focusable="false" />
                                </Border>
                            </Grid>
                            <ControlTemplate.Triggers>
                                <Trigger x:Uid="Trigger_1067" Property="IsExpanded" Value="true">
                                    <Setter x:Uid="Setter_1309" TargetName="ExpandSite" Property="Visibility" Value="Visible" />
                                    <Setter x:Uid="Setter_1310" TargetName="HeaderBorder" Property="CornerRadius" Value="4,4,0,0" />
                                </Trigger>
                            </ControlTemplate.Triggers>

                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Trigger>
        </Style.Triggers>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate x:Uid="ControlTemplate_61" TargetType="{x:Type Expander}">
                    <Grid x:Uid="Grid_43">
                        <Grid.RowDefinitions>
                            <RowDefinition x:Uid="RowDefinition_24" Height="Auto" />
                            <RowDefinition Name="ContentRow" x:Uid="RowDefinition_25" Height="*" />
                        </Grid.RowDefinitions>
                        <Border Name="HeaderBorder" x:Uid="Border_31" Background="{TemplateBinding Background}" 
                                BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1,1,1,1" CornerRadius="4">
                            <CheckBox Name="HeaderSite" x:Uid="CheckBox_5" Focusable="false" Margin="4,0,0,0" 
                                      Background="{DynamicResource Text1Brush}" OverridesDefaultStyle="true" 
                                      HorizontalAlignment="Stretch" VerticalAlignment="Stretch" 
                                      Content="{TemplateBinding Header}" 
                                      IsChecked="{Binding Path=IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}">
                                <CheckBox.Template>
                                    <ControlTemplate x:Uid="ControlTemplate_62" TargetType="{x:Type CheckBox}">
                                        <Grid Name="CheckBoxContent" ToolTip="Expand">
                  
                                            <ContentPresenter Name="ContentHeader" x:Uid="ContentPresenter_26" 
                                                              HorizontalAlignment="Left" Focusable="false" Margin="48,4,4,4" RecognizesAccessKey="true" />
                                        </Grid>
                                        <ControlTemplate.Triggers>
                                            <Trigger x:Uid="Trigger_1034" Property="IsChecked" Value="True">
                                                <Setter x:Uid="Setter_70" TargetName="CheckBoxContent" 
                                                        Localization.Attributes="Value(Readable Modifiable)" Property="ToolTip" Value="Collapse" />
                                            </Trigger>
                                        </ControlTemplate.Triggers>
                                    </ControlTemplate>
                                </CheckBox.Template>
                            </CheckBox>
                        </Border>
                        <Border Name="ExpandSite" x:Uid="Border_32" Visibility="Collapsed" Grid.Row="1" 
                                Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" 
                                CornerRadius="0,0,4,4" BorderThickness="1,0,1,1">
                            <ContentPresenter x:Uid="ContentPresenter_27" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" 
                                              VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" 
                                              Focusable="false" />
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger x:Uid="Trigger_1036" Property="IsExpanded" Value="true">
                            <Setter x:Uid="Setter_1210" TargetName="ExpandSite" Property="Visibility" Value="Visible" />
                            <Setter x:Uid="Setter_1211" TargetName="HeaderBorder" Property="CornerRadius" Value="4,4,0,0" />
                            <Setter x:Uid="Setter_1621" TargetName="HeaderBorder" Property="BorderThickness" Value="1,1,1,0" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Background" Value="{DynamicResource MainWindowBackgroundBrush}" />
        <Setter Property="Foreground" Value="{DynamicResource Text1Brush}" />
        <Setter Property="FontSize" Value="14" />
        <Setter Property="FontWeight" Value="Bold" />
        <Setter Property="BorderBrush" Value="{DynamicResource PaletteBrush}" />
    </Style>
    
    <!--Style x:Key="DefaultListBoxItemStyle" TargetType="{x:Type ListBoxItem}"-->
    <LinearGradientBrush x:Key="ListSelectionGrad" StartPoint="0,1" EndPoint="0,0">
        <LinearGradientBrush.GradientStops>
            <GradientStop Color="#FF757373" Offset="0" />
            <GradientStop Color="#FFEEEEEE" Offset="1" />
        </LinearGradientBrush.GradientStops>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ListSelectedTextBrush"  Color="#FF333333" />
    <SolidColorBrush x:Key="ListBackgroundBrush" Color="#FF333333" />
    <Style x:Key="DefaultListBoxItemStyle" TargetType="{x:Type ListBoxItem}">
        <Style.Triggers>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsMouseOver" Value="true" />
                    <Condition Property="IsSelected" Value="false" />
                </MultiTrigger.Conditions>
                <Setter x:Uid="Setter_1025" Property="Background" Value="{DynamicResource ButtonMouseOverBackgroundBrush}" />
                <Setter x:Uid="Setter_1026" Property="Foreground" Value="{DynamicResource ListBackgroundBrush}" />
            </MultiTrigger>
            <Trigger x:Uid="Trigger_11" Property="IsSelected" Value="true">
                <Setter x:Uid="Setter_221" Property="Background" Value="{DynamicResource ListSelectionGrad}" />
                <Setter x:Uid="Setter_1024" Property="Foreground" Value="{DynamicResource ListSelectedTextBrush}" />
            </Trigger>
            <Trigger x:Uid="Trigger_26" Property="IsEnabled" Value="false">
                <Setter x:Uid="Setter_1056" Property="Background" Value="{DynamicResource ListBackgroundBrush}" />
                <Setter x:Uid="Setter_1057" Property="Foreground" Value="{DynamicResource DisabledTextBrush}" />
            </Trigger>
        </Style.Triggers>
        <Setter x:Uid="Setter_497" Property="BorderBrush" Value="Transparent" />
        <Setter x:Uid="Setter_498" Property="Background" Value="{DynamicResource RecessedBrush}" />
        <Setter x:Uid="Setter_1137" Property="FontFamily" Value="{DynamicResource {x:Static SystemFonts.MessageFontFamily}}" />
        <Setter x:Uid="Setter_1138" Property="FontSize" Value="12" />
        <Setter x:Uid="Setter_1139" Property="FontWeight" Value="{DynamicResource {x:Static SystemFonts.MessageFontWeight}}" />
        <Setter x:Uid="Setter_1055" Property="Padding" Value="4,2,4,2" />
        <Setter x:Uid="Setter_1413" Property="MinHeight" Value="20" />
        <Setter x:Uid="Setter_1165" Property="IsTabStop" Value="false" />
        <Setter x:Uid="Setter_1577" Property="BorderThickness" Value="1" />
        <Setter x:Uid="Setter_1654" Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter x:Uid="Setter_167" Property="Template">
            <Setter.Value>
                <ControlTemplate x:Uid="ControlTemplate_17" TargetType="{x:Type ListBoxItem}">
                    <Border Name="ListBoxItemRoot" CornerRadius="2" 
                            BorderThickness="{TemplateBinding BorderThickness}" 
                            BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
                        <ContentPresenter Name="ListBoxItemContent" 
                                          Content="{TemplateBinding Content}" 
                                          ContentTemplate="{TemplateBinding ContentTemplate}" 
                                          ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" 
                                          HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" 
                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
    <Style x:Key="DefaultListBoxStyle" TargetType="{x:Type ListBox}">
        <Setter Property="BorderBrush" Value="{DynamicResource ListBackgroundBrush}" />
        <Setter Property="Background" Value="{DynamicResource ListBackgroundBrush}" />
        <Setter Property="Foreground" Value="{DynamicResource Text1Brush}" />
        <Setter Property="ItemContainerStyle" Value="{StaticResource DefaultListBoxItemStyle}" />
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListBox}">
                    <Border CornerRadius="2" Background="{TemplateBinding Background}" 
                            BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                        <ScrollViewer CanContentScroll="true" 
                                      HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" 
                                      VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}" 
                                      Padding="{TemplateBinding Padding}">
                            <ItemsPresenter  />
                        </ScrollViewer>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="{x:Type ListBox}" BasedOn="{StaticResource DefaultListBoxStyle}"/>



    <!--Style x:Key="dgHeaderStyle" TargetType="dg:DataGridColumnHeader"-->
    <LinearGradientBrush x:Key="dgHeaderBrush" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Color="#FF6B8E95" Offset="0"/>
        <GradientStop Color="#FF14A7C1" Offset="1"/>
        <GradientStop Color="#FF1E424E" Offset="0.509"/>
        <GradientStop Color="#FF1D4855" Offset="0.542"/>
        <GradientStop Color="#FF1D4855" Offset="0.542"/>
        <GradientStop Color="#FF193A44" Offset="0.526"/>
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="dgHeaderBorderBrush" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Color="#FF1D1D1D" Offset="0.614"/>
        <GradientStop Color="#FF007F96" Offset="0.853"/>
        <GradientStop Color="#FF0AEAFA" Offset="1"/>
    </LinearGradientBrush>
    <Style TargetType="Toolkit:DataGridColumnHeader">
        <Setter Property="Background" Value="{StaticResource dgHeaderBrush}" />
        <Setter Property="Foreground" Value="White" />
        <Setter Property="BorderBrush" Value="{StaticResource dgHeaderBorderBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="SnapsToDevicePixels" Value="True" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="MinWidth" Value="0" />
        <Setter Property="MinHeight" Value="30" />
        <Setter Property="Cursor" Value="Hand" />
    </Style>

</ResourceDictionary>